import {request} from '../utils/request'
// const LOGIN_USER = 'http://dev.basic.lbs.p.yufeiworld.com/'
// const LOGIN_USER = 'http://dev.gateway.lbs.p.yufeiworld.com'
const LOGIN_USER = ''
// 二维码管理

// 修改店铺二维码状态为禁用
export const requestChainDisable = (id: number) => {
    return request({
        url: LOGIN_USER + `/admin/basic/chain/disable/${id}`,
        method: "PUT",
        header: {
            'content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

// 修改店铺二维码状态为启用
export const requestChainEnable = (id: number) => {
    return request({
        url: LOGIN_USER + `/admin/basic/chain/enable/${id}`,
        method: "PUT",
        header: {
            'content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

export type ChainInfo = {
    areaId: number,
    cityId: number,
    pageNo: number,
    pageSize: number,
    provinceId: number,
    storeName: string
}
// 获取二维码列表
export const requestChainGetAll = (chainInfo: Partial<ChainInfo>) => {
    return request({
        url: LOGIN_USER + `/admin/basic/chain/getAll`,
        method: "POST",
        data: chainInfo,
    })
}